libkovan
1
The kovan standard library
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
graphics.h
Go to the documentation of this file.
1
#ifndef _GRAPHICS_H_
2
#define _GRAPHICS_H_
3
12
#include <
kovan/export.h
>
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
17
25
EXPORT_SYM
int
graphics_open
(
int
width,
int
height);
26
31
EXPORT_SYM
void
graphics_close
();
32
38
EXPORT_SYM
void
graphics_update
();
39
44
EXPORT_SYM
void
graphics_clear
();
45
46
typedef
enum
Encoding
{
47
RGB
,
48
BGR
49
}
Encoding
;
50
51
52
EXPORT_SYM
void
graphics_blit
(
const
unsigned
char
*data,
int
x,
int
y,
int
width,
int
height);
53
EXPORT_SYM
void
graphics_blit_region
(
const
unsigned
char
*data,
int
sx,
int
sy,
int
ex,
int
ey,
int
width,
int
height,
int
dx,
int
dy);
54
55
EXPORT_SYM
void
graphics_blit_enc
(
const
unsigned
char
*data,
Encoding
enc,
int
x,
int
y,
int
width,
int
height);
56
EXPORT_SYM
void
graphics_blit_region_enc
(
const
unsigned
char
*data,
Encoding
enc,
int
sx,
int
sy,
int
ex,
int
ey,
int
width,
int
height,
int
dx,
int
dy);
57
65
EXPORT_SYM
void
graphics_fill
(
int
r,
int
g,
int
b);
66
74
EXPORT_SYM
void
graphics_pixel
(
int
x,
int
y,
int
r,
int
g,
int
b);
75
83
EXPORT_SYM
void
graphics_line
(
int
x1,
int
y1,
int
x2,
int
y2,
int
r,
int
g,
int
b);
84
92
EXPORT_SYM
void
graphics_circle
(
int
cx,
int
cy,
int
radius,
int
r,
int
g,
int
b);
93
101
EXPORT_SYM
void
graphics_circle_fill
(
int
cx,
int
cy,
int
radius,
int
r,
int
g,
int
b);
102
114
EXPORT_SYM
void
graphics_rectangle
(
int
x1,
int
y1,
int
x2,
int
y2,
int
r,
int
g,
int
b);
115
127
EXPORT_SYM
void
graphics_rectangle_fill
(
int
x1,
int
y1,
int
x2,
int
y2,
int
r,
int
g,
int
b);
128
136
EXPORT_SYM
void
graphics_triangle
(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
r,
int
g,
int
b);
137
145
EXPORT_SYM
void
graphics_triangle_fill
(
int
x1,
int
y1,
int
x2,
int
y2,
int
x3,
int
y3,
int
r,
int
g,
int
b);
146
147
enum
KeyCode
148
{
149
KeyEnter
=
'\n'
,
150
KeyBackSpace
=
'\b'
,
151
KeyTab
=
'\t'
,
152
KeyCancel
= 0x03,
153
KeyClear
= 0x0C,
154
KeyShift
= 0x10,
155
KeyControl
= 0x11,
156
KeyAlt
= 0x12,
157
KeyPause
= 0x13,
158
KeyCapsLock
= 0x14,
159
KeyEscape
= 0x1B,
160
KeySpace
= 0x20,
161
KeyPageUp
= 0x21,
162
KeyPageDown
= 0x22,
163
KeyEnd
= 0x23,
164
KeyHome
= 0x24,
165
KeyLeft
= 0x25,
166
KeyUp
= 0x26,
167
KeyRight
= 0x27,
168
KeyDown
= 0x28,
169
KeyComma
= 0x2C,
170
KeyPeriod
= 0x2E,
171
KeySlash
= 0x2F,
172
KeyZero
= 0x30,
173
KeyOne
= 0x31,
174
KeyTwo
= 0x32,
175
KeyThree
= 0x33,
176
KeyFour
= 0x34,
177
KeyFive
= 0x35,
178
KeySix
= 0x36,
179
KeySeven
= 0x37,
180
KeyEight
= 0x38,
181
KeyNine
= 0x39,
182
KeySemiColon
= 0x3B,
183
KeyEquals
= 0x3D,
184
KeyA
= 0x41,
185
KeyB
= 0x42,
186
KeyC
= 0x43,
187
KeyD
= 0x44,
188
KeyE
= 0x45,
189
KeyF
= 0x46,
190
KeyG
= 0x47,
191
KeyH
= 0x48,
192
KeyI
= 0x49,
193
KeyJ
= 0x4A,
194
KeyK
= 0x4B,
195
KeyL
= 0x4C,
196
KeyM
= 0x4D,
197
KeyN
= 0x4E,
198
KeyO
= 0x4F,
199
KeyP
= 0x50,
200
KeyQ
= 0x51,
201
KeyR
= 0x52,
202
KeyS
= 0x53,
203
KeyT
= 0x54,
204
KeyU
= 0x55,
205
KeyV
= 0x56,
206
KeyW
= 0x57,
207
KeyX
= 0x58,
208
KeyY
= 0x59,
209
KeyZ
= 0x5A,
210
KeyOpenBracket
= 0x5B,
211
KeyBackSlash
= 0x5C,
212
KeyCloseBracket
= 0x5D,
213
KeyNumPad0
= 0x60,
214
KeyNumPad1
= 0x61,
215
KeyNumPad2
= 0x62,
216
KeyNumPad3
= 0x63,
217
KeyNumPad4
= 0x64,
218
KeyNumPad5
= 0x65,
219
KeyNumPad6
= 0x66,
220
KeyNumPad7
= 0x67,
221
KeyNumPad8
= 0x68,
222
KeyNumPad9
= 0x69,
223
KeyMultiply
= 0x6A,
224
KeyAdd
= 0x6B,
225
KeySeparator
= 0x6C,
226
KeySubtract
= 0x6D,
227
KeyDecimal
= 0x6E,
228
KeyDivide
= 0x6F,
229
KeyF1
= 0x70,
230
KeyF2
= 0x71,
231
KeyF3
= 0x72,
232
KeyF4
= 0x73,
233
KeyF5
= 0x74,
234
KeyF6
= 0x75,
235
KeyF7
= 0x76,
236
KeyF8
= 0x77,
237
KeyF9
= 0x78,
238
KeyF10
= 0x79,
239
KeyF11
= 0x7A,
240
KeyF12
= 0x7B,
241
KeyDelete
= 0x7F,
242
KeyNumLock
= 0x90,
243
KeyScrollLock
= 0x91,
244
KeyPrintScreen
= 0x9A,
245
KeyInsert
= 0x9B,
246
KeyHelp
= 0x9C,
247
KeyMeta
= 0x9D,
248
KeyBackQuote
= 0xC0,
249
KeyQuote
= 0xDE,
250
KeyFinal
= 0x18,
251
KeyConvert
= 0x1C,
252
KeyNonConvert
= 0x1D,
253
KeyAccept
= 0x1E,
254
KeyModeChange
= 0x1F,
255
KeyKana
= 0x15,
256
KeyKanji
= 0x19,
257
KeyUndefined
= 0x0
258
};
259
268
EXPORT_SYM
int
get_key_state
(
enum
KeyCode
key);
269
274
EXPORT_SYM
void
get_mouse_position
(
int
*x,
int
*y);
275
281
EXPORT_SYM
int
get_mouse_middle_button
();
282
288
EXPORT_SYM
int
get_mouse_left_button
();
289
295
EXPORT_SYM
int
get_mouse_right_button
();
296
297
#ifdef __cplusplus
298
}
299
#endif
300
301
#endif
include
kovan
graphics.h
Generated on Mon Aug 19 2013 00:33:00 for libkovan by
1.8.4